# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=gupnp-tools
pkgver=0.12.1
pkgrel=1
pkgdesc="Utilities and demos to work with UPnP"
url="https://wiki.gnome.org/Projects/GUPnP"
arch=(loong64 x86_64)
license=(GPL)
depends=(gtksourceview4 gupnp gupnp-av)
makedepends=(meson git)
_commit=487a27b9c6fee23e82bf2e0feb836da75588b5c8  # tags/gupnp-tools-0.12.1^0
source=("git+https://gitlab.gnome.org/GNOME/gupnp-tools.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^gupnp-tools-//;s/[^-]*-g/r&/;s/-/+/g'
}

build() {
  # Deprecated 'xmlRecoverMemory'
  CFLAGS+=" -Wno-error=deprecated-declarations"

  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
